<script setup lang="ts">
import { computed, ref } from 'vue';

// computed添加类型
// const count = ref(100)
// const doubleCount = computed(() => count.value * 2)
// doubleCount.value.
type Item = {
    id: string
    name: string
    price: number
}
const list = ref<Item[]>([
    {id: '11', name: '南鞋', price: 888},
    {id: '12', name: '北鞋', price: 188},
    {id: '13', name: '东鞋', price: 288}
])
const filterList = computed(() => {
    return list.value.filter(item => item.price > 500)
})
console.log(filterList.value);

</script>

<template>

</template>

<style scoped>
</style>
